package com.jm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jm.common.util.entity.Phone;
import com.jm.common.util.entity.SelectCondition;
import com.jm.pojo.Admin;
import com.jm.pojo.User;
import com.jm.pojo.dto.UserDto;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface UserService extends IService<User> {

    boolean sendMessage(Phone phone);

    boolean  checkPhoneNumber(Phone phone);

    boolean checkUserIsExits(String phoneNumber);

    User getUserByPhone(String phoneNumber);

    IPage<User> selectByPageCondition(SelectCondition condition);

    UserDto toDto(User user);

    IPage<UserDto> toDto(IPage<User> userIPage);

    boolean checkUsernameAndPassword(String phoneNumber, String password);
}
